﻿using System;

namespace Gmantis.Controls.DataGrid
{
    public class DataGridBeginningNewRowEventArgs : EventArgs
    {
        // Methods
        internal DataGridBeginningNewRowEventArgs(DataGridNewRow newRow)
        {
            this.NewRow = newRow;
        }

        // Properties
        public bool Cancel { get; set; }

        public object Item
        {
            get
            {
                return this.NewRow.DataItem;
            }
            set
            {
                this.NewRow.DataItem = value;
            }
        }

        public DataGridNewRow NewRow { get; private set; }
    }
}
